import request from '@/utils/request'

// 查询职能部门设置列表
export function listDepartments(query) {
  return request({
    url: '/campus/departments/list',
    method: 'get',
    params: query
  })
}

// 查询职能部门设置详细
export function getDepartments(cddId) {
  return request({
    url: '/campus/departments/' + cddId,
    method: 'get'
  })
}

// 新增职能部门设置
export function addDepartments(data) {
  return request({
    url: '/campus/departments',
    method: 'post',
    data: data
  })
}

// 修改职能部门设置
export function updateDepartments(data) {
  return request({
    url: '/campus/departments',
    method: 'put',
    data: data
  })
}

// 删除职能部门设置
export function delDepartments(cddId) {
  return request({
    url: '/campus/departments/' + cddId,
    method: 'delete'
  })
}
